<?php
/**
 * @Author: Wang Chunsheng 2192138785@qq.com
 * @Date:   2020-03-27 21:08:23
 * @Last Modified by:   Wang Chunsheng 2192138785@qq.com
 * @Last Modified time: 2020-03-27 21:08:23
 */
 

namespace common\addons\diandi_shop\api;

use Yii;
use api\controllers\AController;

class IndexController extends AController
{
    public $modelClass = '\common\models\DdGoods';

    public function actionSearch()
    {
        return [
            'error_code'    => 20,
            'res_msg'       => 'ok',
        ];
    }

    /**
     * @SWG\Post(path="/diandi_shop/Index/base",
     *     tags={"首页"},
     *     summary="首页基础数据.",
     *     @SWG\Response(
     *         response = 200,
     *         description = "首页",
     *     ),
     *     @SWG\Parameter(
       *     in="formData",
       *     name="access-token",
       *     type="string",
       *     description="用户秘钥",
       *     required=true,
       *   ),
     * )
     */
    public function actionBase()
    {
        return 43;
    }

    /**
     * @SWG\Post(path="/diandi_shop/Index/page",
     *     tags={"首页"},
     *     summary="首页页面配置",
     *     @SWG\Response(
     *         response = 200,
     *         description = "页面配置",
     *     ),
     *     @SWG\Parameter(
       *     in="formData",
       *     name="access-token",
       *     type="string",
       *     description="用户秘钥",
       *     required=true,
       *   ),
     * )
     */
    public function actionPage()
    {
        return 43;
    }
}
